import os

from dotenv import load_dotenv
from langchain_community.chat_models.tongyi import ChatTongyi

if __name__ == '__main__':
    load_dotenv(override=True)
    DASHSCOPE_API_KEY = os.getenv("DASHSCOPE_API_KEY")
    model = ChatTongyi(api_key=DASHSCOPE_API_KEY)
    response = model.invoke("你好，请介绍一下你自己")
    print(response.content)
